package com.tobydietrich.utils
{
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import com.tobydietrich.utils.TobyDietrichEvent;

	public class DebugSprite extends Sprite
	{
		public function DebugSprite()
		{
			super();
			addEventListener(MouseEvent.MOUSE_OVER, function eOver(event:Event):void {
				var d:DebugSprite = event.target as DebugSprite;
				if(d == null) {
					trace('Mouseover something');
				} else {
					trace("Mouseover " + d.name + " " + DisplayObjectTraceXML.traceXML(d));
				}
				dispatchEvent(new TobyDietrichEvent(TobyDietrichEvent.MOUSE_OVER_SPRITE, false, false, this.data));
			});
		}
		
	}
}